# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Valery Kartel <valery.kartel@gmail.com>
pkgname=perl-cgi-fast
_pkgreal=CGI-Fast
pkgver=2.15
pkgrel=0
pkgdesc="CGI Interface for Fast CGI"
url="https://metacpan.org/release/CGI-Fast"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl-cgi perl-fcgi"
makedepends="perl-dev"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/L/LE/LEEJO/CGI-Fast-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

build() {
	cd "$builddir"
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
	make
}

check() {
	make -C "$builddir" test
}

package() {
	make -C "$builddir" DESTDIR="$pkgdir" install
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="b984cbcf5d1d96dd9fcb58b704ae643e127fcdbe37b4d7e7560e5e1219abb849d72c4ff5a2eb45d7f076a126543b06fda282aabf2c3788b8a87f075c081d30c1  CGI-Fast-2.15.tar.gz"
